/**
  * @(#) NovelChapters.java  
  *
  * @author lihg 
  * @version V1.0 2013-10-5  
  *
  * Copyright (C) 2010,2013 , Lihg
  */

/**
 * 
 */
package cn.com.dshome.acquisition.entity.novel;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import cn.com.dshome.acquisition.entity.BaseEntity;

/**
 * 
 * Purpose:小说章节表
 * 
 * @author lihg 
 * @see	    
 * @since
 */
@Entity
@Table(name = "DSHOME_NOVEL_CHAPTERS")
public class NovelChapters extends BaseEntity {

	private static final long serialVersionUID = 5443967827978806804L;
	
	/**
	 * 章节名称
	 */
	@Column(name = "name" , length = 64)
	private String name ; 
	
	/**
	 * 文章内容
	 */
	@Lob
	@Basic(fetch = FetchType.LAZY)
	@Column(name = "content" , columnDefinition = "blob")
	private byte[] content ;
	
	/**
	 * 更新时间
	 */
	@Column(name = "update_time")
	private Date updateTime ;
	
	/**
	 * 所属文章
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "article_id" , referencedColumnName = "id")
	private NovelArticles article ;
	
	/**
	 * 字数
	 */
	@Column(name = "word_count")
	private Integer wordCount ;

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the content
	 */
	public byte[] getContent() {
		return content;
	}

	/**
	 * @param content the content to set
	 */
	public void setContent(byte[] content) {
		this.content = content;
	}

	/**
	 * @return the updateTime
	 */
	public Date getUpdateTime() {
		return updateTime;
	}

	/**
	 * @param updateTime the updateTime to set
	 */
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	/**
	 * @return the article
	 */
	public NovelArticles getArticle() {
		return article;
	}

	/**
	 * @param article the article to set
	 */
	public void setArticle(NovelArticles article) {
		this.article = article;
	}

	/**
	 * @return the wordCount
	 */
	public Integer getWordCount() {
		return wordCount;
	}

	/**
	 * @param wordCount the wordCount to set
	 */
	public void setWordCount(Integer wordCount) {
		this.wordCount = wordCount;
	}
}


/**
 * Revision history
 * -------------------------------------------------------------------------
 * 
 * Date Author Note
 * -------------------------------------------------------------------------
 * 2013-10-5 下午12:49:33 lihg 创建版本
 */